package net.pimpas.communication.channel;

import java.util.Date;
import java.util.List;

import net.pimpas.communication.exception.CommunicationException;
import net.pimpas.communication.listener.ChannelListener;
import net.pimpas.communication.message.Message;

public interface Channel {
	
	String getId( );
	Date getCreatedTime( );
	Date getLastMessageTime( );
	boolean isTerminated( );
	void subscribe( ChannelListener listener );
	List<Message> unsubscribe( ChannelListener listener );
	void close( );
	void send(Message message) throws CommunicationException;

}